package com.card.server.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author TISNIW
 * @version 1.0
 * @date 2025/5/1 16:18
 * @desc 状态码枚举
 */
@Getter
@AllArgsConstructor
public enum ResultCode {
    //定义通用状态码
    //操作成功
    SUCCESS(100,"操作成功"),
    //操作失败，服务器无异常
    //验证码服务异常
    VALIDATE_CODE_FAILED(3001,"验证码服务异常"),
    //验证码校验失败
    VALIDATE_CODE_ERROR(3002,"验证码校验失败"),
    //验证码已失效
    VALIDATE_CODE_EXPIRED(3003,"验证码已失效"),
    //邮箱格式错误
    EMAIL_FORMAT_ERROR(3004,"邮箱格式错误"),
    //邮箱已存在
    EMAIL_EXIST(3005,"邮箱已存在"),
    //邮箱不存在
    EMAIL_NOT_EXIST(3006,"邮箱不存在"),
    //账号不存在
    ACCOUNT_NOT_EXIST(3007,"请检查您的账号或者密码是否正确"),
    //密码错误
    PASSWORD_ERROR(3008,"请检查您的密码是否正确"),

    //参数校验失败
    VALIDATE_FAILED(404,"参数检验失败"),
    UNAUTHORIZED(401,"暂未登录或token已经过期"),
    FORBIDDEN(403,"没有相关权限"),
    //操作失败，服务器有异常
    FAIL(500,"服务器异常");



    private int code;
    private String msg;
}
